//面向对象的修饰符
class Xiaojiejie2{
    public sex:string;
    protected name:string;
    private age:number;
    public constructor(sex:string,name:string,age:number){
        this.sex = sex;
        this.name = name;
        this.age = age;
    }
    public sayHello(){
        console.log('小哥哥好');
    }

    protected sayLove(){
        console.log('我爱你');
    }
}

var jiejies:Xiaojiejie2 = new Xiaojiejie2('女','周慧敏',18);
console.log(jiejies.sex);
console.log(jiejies.name);
console.log(jiejies.age);
jiejies.sayHello();
jiejies.sayLove();
